package com.zhongzhi.task;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by 郭金鹏 on 2017/7/26.
 */
@Component
public class TestTask {

    private static Logger logger = LoggerFactory.getLogger(TestTask.class);

    @Scheduled(fixedDelay = 1000)
    public void run1(){
        logger.info("每隔1秒执行run1");
    }

}
